import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vite.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': '/src'
    }
  },
   // 代理机制，解决跨域问题
   server:{
    proxy:{
      '/poo':{
        target:'http://8.137.157.16:9002',
        changeOrigin:true,
        rewrite: (path) => path.replace(/^\/poo/, '')
      }
    }
  }
})
